﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ttbit.IGL
{
    public enum ShaderType
    {
        FragmentShader = 35632,
        VertexShader = 35633,
    }
    [Flags]
    public enum ClearFlag
    {
        DepthBufferBit = 0x100,
        StencilBufferBit = 0x400,
        ColorBufferBit = 0x4000
    }
    public enum FrameBufferSlot
    {
        DepthStencilAttachment = 33306,
        ColorAttachment0 = 36064,
        ColorAttachment1 = 36065,
        ColorAttachment2 = 36066,
        ColorAttachment3 = 36067,
        ColorAttachment4 = 36068,
        ColorAttachment5 = 36069,
        ColorAttachment6 = 36070,
        ColorAttachment7 = 36071,
        ColorAttachment8 = 36072,
        ColorAttachment9 = 36073,
        ColorAttachment10 = 36074,
        ColorAttachment11 = 36075,
        ColorAttachment12 = 36076,
        ColorAttachment13 = 36077,
        ColorAttachment14 = 36078,
        ColorAttachment15 = 36079,
        DepthAttachment = 36096,
        StencilAttachment = 36128
    }
    public enum TextureType
    {
        R_U8,
        R_HalfFloat,
        R_Float,
        RGBA_32,
        RGBA_HalfFloat,
        RGBA_Float,
    }
    public enum SamplerParameterName
    {
        TextureMagFilter = 10240,
        TextureMinFilter = 10241,
        TextureWrapS = 10242,
        TextureWrapT = 10243,
        TextureWrapR = 32882,
        TextureMinLod = 33082,
        TextureMaxLod = 33083,
        TextureCompareMode = 34892,
        TextureCompareFunc = 34893
    }
    public enum SamplerValue
    {
        Clamp = 10496,
        Repeat = 10497,
        Nearest = 9728,
        Linear = 9729,
    }

    public enum EnableCap
    {
        CullFace = 2884,
        DepthTest = 2929,
        StencilTest = 2960,
        Dither = 3024,
        Blend = 3042,
        ScissorTest = 3089,
        Texture2D = 3553,
        PolygonOffsetFill = 32823,
        SampleAlphaToCoverage = 32926,
        SampleCoverage = 32928,
        RasterizerDiscard = 35977,
        PrimitiveRestartFixedIndex = 36201
    }
    public enum BlendEquationMode
    {
        FuncAdd = 32774,
        Min = 32775,
        Max = 32776,
        FuncSubtract = 32778,
        FuncReverseSubtract = 32779
    }
    public enum BlendingFactorSrc
    {
        Zero = 0,
        SrcColor = 768,
        OneMinusSrcColor = 769,
        SrcAlpha = 770,
        OneMinusSrcAlpha = 771,
        DstAlpha = 772,
        OneMinusDstAlpha = 773,
        DstColor = 774,
        OneMinusDstColor = 775,
        SrcAlphaSaturate = 776,
        ConstantColor = 32769,
        OneMinusConstantColor = 32770,
        ConstantAlpha = 32771,
        OneMinusConstantAlpha = 32772,
        One = 1
    }
    public enum BlendingFactorDest
    {
        Zero = 0,
        SrcColor = 768,
        OneMinusSrcColor = 769,
        SrcAlpha = 770,
        OneMinusSrcAlpha = 771,
        DstAlpha = 772,
        OneMinusDstAlpha = 773,
        DstColor = 774,
        OneMinusDstColor = 775,
        SrcAlphaSaturate = 776,
        ConstantColor = 32769,
        OneMinusConstantColor = 32770,
        ConstantAlpha = 32771,
        OneMinusConstantAlpha = 32772,
        One = 1
    }
    public enum TextureUnit
    {
        Texture0 = 33984,
        Texture1,
        Texture2,
        Texture3,
        Texture4,
        Texture5,
        Texture6,
        Texture7,
        Texture8,
        Texture9,
        Texture10,
        Texture11,
        Texture12,
        Texture13,
        Texture14,
        Texture15,
        Texture16,
        Texture17,
        Texture18,
        Texture19,
        Texture20,
        Texture21,
        Texture22,
        Texture23,
        Texture24,
        Texture25,
        Texture26,
        Texture27,
        Texture28,
        Texture29,
        Texture30,
        Texture31,
        ActiveTexture
    }
    public enum BufferTarget
    {
        ArrayBuffer = 34962,
        ElementArrayBuffer = 34963,
        PixelPackBuffer = 35051,
        PixelUnpackBuffer = 35052,
        UniformBuffer = 35345,
        TransformFeedbackBuffer = 35982,
        CopyReadBuffer = 36662,
        CopyWriteBuffer = 36663
    }

    public enum VertexAttribPointerType
    {
        Byte = 5120,
        UnsignedByte = 5121,
        Short = 5122,
        UnsignedShort = 5123,
        Int = 5124,
        UnsignedInt = 5125,
        Float = 5126,
        HalfFloat = 5131,
        Fixed = 5132,
        UnsignedInt2101010Rev = 33640,
        Int2101010Rev = 36255
    }

    public enum BeginMode
    {
        Points,
        Lines,
        LineLoop,
        LineStrip,
        Triangles,
        TriangleStrip,
        TriangleFan
    }
    public enum DrawElementsType
    {
        UnsignedByte = 5121,
        UnsignedShort = 5123,
        UnsignedInt = 5125
    }
    public enum BufferUsage
    {
        StreamDraw = 35040,
        StaticDraw = 35044,
        DynamicDraw = 35048
    }
}
